package d13_math;

public class MathTest {
    public static void main(String[] args) {
        System.out.println(Math.abs(-22));
        System.out.println(Math.abs(-22.33));
        System.out.println(Math.abs(2));
        System.out.println("----取整----");
        System.out.println(Math.ceil(2.3));
        System.out.println(Math.floor(4.3));
        System.out.println(Math.round(4.4));
        System.out.println("-----大小----");
        System.out.println(Math.max(22,23));
        System.out.println(Math.min(22,23));
        System.out.println("-----幂次----");
        System.out.println(Math.pow(2,3));
        System.out.println(Math.pow(2,4));
        System.out.println("-----随机数----");
        System.out.println(Math.random());


    }
}
